/*
 * Copyright 2013 NJUT  qixiaobo. All rights reserved.
 */
package com.fujitsu.nanjing.tieba.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fujitsu.nanjing.tieba.base.BaseService;
import com.fujitsu.nanjing.tieba.ibator.CoreErrorLog;
import com.fujitsu.nanjing.tieba.ibator.CoreErrorLogCriteria;
import com.fujitsu.nanjing.tieba.model.ErrorLog;

/**
 * ErrorLogService.java
 * 
 * @author Administrator
 */
@Service
@Transactional
public class ErrorLogService
		extends
			BaseService<CoreErrorLog, CoreErrorLogCriteria> {
	@Resource
	private ErrorLog errorLog;
	@Override
	public CoreErrorLog findById(String id) {
		return errorLog.selectByPrimaryKey(Integer.parseInt(id));
	}

	@Override
	public CoreErrorLog insert(CoreErrorLog t) {
		errorLog.insertSelective(t);
		return t;
	}

	@Override
	public void update(CoreErrorLog t) {
		errorLog.updateByPrimaryKeySelective(t);

	}

	@Override
	public void delete(CoreErrorLog t) {
		errorLog.deleteByPrimaryKey(t.getLogid());

	}

}
